<template>
	<div>
		<van-cell v-for="(val,ind) in tagsData" :key="ind" @click="listEvent(val.name)">
			<span>{{val.name}}</span>
			<!-- <span style="float: right;">创建时间：{{val.createTime | dateFormat}}</span> -->
		</van-cell>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				//获取精品歌单数据
				tagsData: []
			};
		},
		created() {
			this.gettagsData()
		},
		methods: {
			//获取精品歌单数据
			async gettagsData() {
				let {
					data: ret
				} = await this.$http.get('/playlist/highquality/tags')
				//console.log(ret)
				this.tagsData = ret.tags;
			},
			listEvent(name) {
				this.$router.push({
					path: "/hotlist",
					query: {
						cat: name
					},
				})
			}
		}
	}
</script>

<style lang="less" scoped>
</style>
